<?php 
class Item extends CI_Controller {
	
	function item()
	{
		parent::__construct();
		$this->load->library('session');
		$this->load->library('form_validation');
		$this->load->library('encrypt');
		$this->load->library('enc');
        $this->load->model('mmaster');
        $this->load->model('mglobal');
		$this->load->model('mitem');
		$this->is_logged_in();
		#$this->mjadwal->saveLog();
	}


function is_logged_in()
	{
		$is_logged_in = $this->session->userdata('is_logged_in');
		if(!isset($is_logged_in) || $is_logged_in != true)
		{
			redirect(base_url() .'index.php/login');
		}		
	}

function itemmanagement($act="",$page="")
	{
		$data['template'] = "shell/smooth";
        $data['main_view']     = 'f-items';
        $this->load->view($data['template'],$data);
	}
// fungsi untuk ssp data tabel

function read_matcode(){
  	$data = $this->mitem->coba_ssp();
	echo json_encode($data);
  }

function update_item($id)
	{
		$data['template'] = "shell/smooth";
        $data['main_view']     = 'f-update-items';
        $this->load->view($data['template'],$data);
	}
	
}

?>